package com.hxzy.springbootrabbitconsumer.service;

import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

/**
 * rabbitmq消费者监听某些队列
 *
 * @author admin
 * @date 2021-07-22
 */
@Log4j2
@Service
@RabbitListener(queues = {"hxzy_mobile"})
public class HxzyMobileConsumerService {

    @RabbitHandler
    public void receive(String message){
        log.debug("发短信的:"+message);


        log.debug("发送短信,自己要实现的业务逻辑，异步操作了");

    }


}
